package com.diandi.log;

import java.util.LinkedHashMap;

/**
 * Created by 袁恩光 on 2017/11/29.
 */
public class LogTemp {


    /**
     * feign 日志传播标志
     */
    public static final String NEXT_LOG_DATA = "nextLogData";

    /**
     * log主线程名
     */
    public static final ThreadLocal<String> LOG_MAIN_NAME = new ThreadLocal<>();

    /**
     * step 步骤第几步 初始0
     */
    public static final ThreadLocal<Integer> LOG_STEP = new ThreadLocal<>();

    /**
     * log step 执行时间
     */
    public static final ThreadLocal<Long> LOG_STEP_TIME = new ThreadLocal<>();

    /**
     * 日志分析信息
     */
    public static final ThreadLocal<LinkedHashMap<String, String>> LOG_TITLE_MESSAGE = new ThreadLocal<>();

    public static void clean() {
        LogTemp.LOG_MAIN_NAME.remove();
        LogTemp.LOG_STEP.remove();
        LogTemp.LOG_STEP_TIME.remove();
        LogTemp.LOG_TITLE_MESSAGE.remove();
    }

}
